/**
 * Created by Administrator on 2018/9/4 0004.
 */
import {MainComponent} from '../layout/main/main.component';
import {PageComponent} from '../layout/page/page.component';
import {SettingUrl} from '../public/setting/setting_url';
import {Routes} from '@angular/router';

export const routes: Routes = [
  {
    path: 'main',
    component: MainComponent,
    children: [
      {path: 'home', loadChildren: './home/home.module#HomeModule'}, //首页
      {path: 'my', loadChildren: './my/my.module#MyModule'}, //我的团队
      {path: 'news', loadChildren: './news/news.module#NewsModule'}, //新闻
      {path: 'user', loadChildren: './user/user.module#UserModule'}, //用户
      {path: 'platform', loadChildren: './platform/platform.module#PlatformModule'}, //平台
      {path: 'miner', loadChildren: './miner/miner.module#MinerModule'}, //矿机
      {path: 'star', loadChildren: './star/star.module#StarModule'}, //星级
      {path: 'finance', loadChildren: './finance/finance.module#FinanceModule'}, //财务
      {path: 'count', loadChildren: './count/count.module#CountModule'}, //子账户
      {path: 'setting', loadChildren: './setting/setting.module#SettingModule'}, //设置
    ]
  },
  {
    path: 'page',
    component: PageComponent,
    children: [
      {path: '', loadChildren: './pages/pages.module#PagesModule'},
    ]
  },
  // 路由指向找不到时，指向这里
  {path: '**', redirectTo: SettingUrl.ROUTERLINK.basic.home}
];
